package com.lic.lesson2db.config;

import com.lic.lesson2db.interceptor.SesisonInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @Author : LiChengLin
 * @Description:
 * @Date:Created in 2018/9/17 23:58
 * @Modified By:
 **/
@Configuration
public class SessionConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new SesisonInterceptor()).addPathPatterns("/**").excludePathPatterns("/user/login");
    }
}
